# -*- coding:utf-8 -*-
# @Time : 2020/12/9 10:02
# @Author: limeng
# @File : view.py
from . import bug_reopen
from .service import bug_reopen_service
from ...libs import result, const


@bug_reopen.route('/bug_reopen_rate', methods=['get'])
def bug_reopen_rate():
    """
    开发名下reopen bug数量统计

    :param bug_name:
    :return:
    """
    res = bug_reopen_service.bug_reopen_rate()
    return result(const.SUCCESS, const.QUERY_SUCCESS, res)


@bug_reopen.route('/bug_reopen_detailed/<bug_name>', methods=['get'])
def bug_reopen_detailed(bug_name):
    """
    reopen明细查询
    :param bug_name:
    :return:
    """
    res = bug_reopen_service.bug_reopen_detailed(bug_name)
    return result(const.SUCCESS, const.QUERY_SUCCESS, res)
